home *** CD-ROM | disk | FTP | other *** search
/ TEKNO 1996 February / TEKNO 2-1996.iso / quake / sound.txt < prev    next >
Text File  |  1996-02-24  |  16KB  |  347 lines

  1. +----------------------------------------+
  2. | The Official Quake Deathmatch TEST     |
  3. | Released Saturday, February 24th, 1996 |
  4. | Copyright (C) 1996 id Software, inc.   |
  5. +----------------------------------------+
  6. | Sound Subsystem Documentation          |
  7. | by Dave Taylor                         |
  8. +----------------------------------------+
  9.  
  10. For DOS Box Quake to get the correct settings for DMA channel and PORT
  11. address, you must set your BLASTER environment variable (or have it set
  12. for you with the DIAGNOSE utility in your SB16 directory).  If you do
  13. not have the BLASTER environment variable set, your sound will not work.
  14. If your sound card supports Sound Blaster compatibility, Windows 95
  15. should set this variable for you.
  16.  
  17. If (when) you see bugs, please use the form attached to the end
  18. of these docs to submit a bug report.  Bugs submitted properly to
  19. quake@idsoftware.com with this form will get attention.  Unformatted
  20. ones sent to personal accounts will be ignored.  If you see problems,
  21. please take the time to do this.  It will help the final game will come
  22. out faster.
  23.  
  24. DMA-style Sound Card Command Line Options, Commands, and Variables
  25. ==================================================================
  26.  
  27. DMA-style sound cards are the most common sound cards available.
  28. They include almost everything on the market as of this demo release.
  29. They play sounds by transferring memory over the system bus via DMA
  30. directly to a digital-to-analog converter, filter, and amplifier, which
  31. goes to your speakers or headphones.  The commands and variables below
  32. apply to these cards but may appear for other styles of sound card later.
  33. These commands work under any operating system.  Command-Line options
  34. are typed on the command line in most any place but only in operating
  35. systems which support command line interfaces, like DOS's COMMAND.COM,
  36. or NEXTSTEP's or Linux's csh, sh, or bash.  For example, under DOS,
  37. the NOSOUND option would be used like this: "C:> quake -nosound".
  38.  
  39. Command-Line Options
  40. --------------------
  41.  
  42. NOSOUND
  43.   Syntax: -nosound
  44.   Description: Not to be confused with the NOSOUND variable specified
  45.     below, this will prevent *any* sound code from being executed.  If
  46.     you are having technical difficulty with the game and then try
  47.     running the game with this option and the problem goes away, then
  48.     the problem is probably somewhere in the sound code.
  49.  
  50. SIMSOUND
  51.   Synxtax: -simsound
  52.   Description: This runs all the sound code, except for the hardware
  53.     code.  In other words, it is loading, mixing the sound effects, doing
  54.     the whole nine yards, and it creates a virtual sound card which
  55.     appears to be playing back sounds, but it is completely fake.
  56.     This is a good way to isolate problems with just the hardware-related
  57.     parts of the sound code.
  58.  
  59. SSPEED
  60.   Syntax: -sspeed <speed>
  61.   Description: This will ask the sound code to set the playback speed
  62.     within the constraints of the capabilities of the card.  This is
  63.     22050 Hz by default and usually from 8000 to 44100.  Making this
  64.     faster does require more CPU horsepower.
  65.  
  66. SBITS
  67.   Syntax: -sbits <sample bits, 8 or 16>
  68.   Description: This will ask the sound code to set the size of the samples
  69.     within the constraints of the capabilities of the sound card.  This is
  70.     16 bits by default.  If your card can support 16, leave it be.  It's
  71.     free on the CPU and sounds better.
  72.  
  73. SMONO
  74.   Syntax: -smono
  75.   Description: This will ask the sound code to do mono playback.  This
  76.     doesn't sound so bad, it might be all your sound card supports.
  77.     The default is stereo.
  78.  
  79. Commands
  80. --------
  81.  
  82. PLAY
  83.   Syntax: play <sound effect relative pathname> ...
  84.   Description: Will play a sound effect at 100% volume at the location of
  85.     the player.  The sound effect must be a WAV (RIFF) file or an
  86.     AIFF file.  If a WAV file, the sound effect may have a cue list.
  87.     The first cue in that list will be interpreted as a loop startpoint,
  88.     and the loop endpoint will be the end of the sound effect.  Sound
  89.     effects may be recorded at any speed and may be either 8-bit or 16-bit.
  90.     If you specify more than one sound effect on the line, they will play
  91.     simultaneously.  If a specified sound effect is not already loaded into
  92.     memory, it will first be loaded from disk.
  93.   Demo Examples: play american/grenade.wav nin/slimbrn2.wav
  94.                  play american/gib.wav
  95.  
  96. PLAYVOL
  97.   Syntax: playvol <sound effect relative pathname> <volume 0.0-1.0> ...
  98.   Description: Will play a sound effect at specified volume at the location
  99.       of the player.  The sound effect must be a WAV (RIFF) file or an
  100.     AIFF file.  If a WAV file, the sound effect may have a cue list.
  101.     The first cue in that list will be interpreted as a loop startpoint,
  102.     and the loop endpoint will be the end of the sound effect.  Sound
  103.     effects may be recorded at any speed and may be either 8-bit or 16-bit.
  104.     If you specify more than one sound effect on the line, they will play
  105.     simultaneously.  If a specified sound effect is not already loaded into
  106.     memory, it will first be loaded from disk.
  107.   Demo Examples: playvol american/grenade.wav 0.5 nin/slimbrn2.wav 0.7
  108.                  playvol american/gib.wav 0.9
  109.  
  110. SOUNDLIST
  111.   Syntax: soundlist
  112.   Description: Will list all the currently cached (loaded) sound effects.
  113.     Each entry will contain the last 11 characters of the filename,
  114.     followed by the length of the sound in bytes, the # of bits in each
  115.     sample (either 8b or 16b), then the speed of the recording (usually
  116.     between 11025 and 44100).  At the end of the list will be the total
  117.     memory usage by all cached sound effects.  If you are experiencing
  118.     memory shortages, experiment with the DECIMATE_SFX variable.  When you
  119.     PLAY a new sound effect which was not previously loaded, it will
  120.     appear in this list.
  121.  
  122. SAVESND
  123.   Syntax: savesnd <sound effect relative pathname>
  124.   Description: Will cache (load) the specified sound effect then save
  125.     it to a file named "snd.raw" in the directory you ran Quake in.  The
  126.     format of this file is raw sound data.  Run SOUNDLIST to see the
  127.     sample bit width and recording speed.  If 8-bit, then the output may
  128.     be either signed or unsigned.  If it sounds funny on playback in a
  129.     sound program, try the other way.
  130.   Demo Examples: savesnd american/gib.wav
  131.  
  132. NUMCHANNELS
  133.   Syntax: numchannels <number of software sound channels>
  134.   Description: This will specify the number of sound channels to mix in
  135.     software.  This number must be 2 or higher.  The first channel is
  136.     not used and may be used later for streaming CD audio.
  137.     Increasing the number of channels will let you hear more
  138.     similtaneous sounds in game play.  However, the more sounds you
  139.     have, the higher the demand on CPU performance.  The default
  140.     is 8 channels.    Note that some times sounds will get cut off
  141.     for other reasons which will be sorted out in later versions.
  142.     Running NUMCHANNELS several times may cause memory problems.
  143.     There are as many "sleeping channels" as there are sound channels.
  144.     Sleeping channels are sound channels which are currently inaudble,
  145.     usually because the sound source is out of your range of hearing,
  146.     but the channels are woken back up when the sound comes back in
  147.     range, assuming the sound effect is not already over, or is looping.
  148.   Demo Examples: numchannels 5
  149.  
  150. SOUNDINFO
  151.   Syntax: soundinfo
  152.   Description: This prints the "portable" information on your current
  153.     audio hardware setting in the game.  It specifies whether there is
  154.     stereo output (0 or 1), the number of samples in the DMA buffer
  155.     (usually 32768 or 65536), the current sample position (changes each
  156.     time you run SOUNDINFO and ranges from 0 to the number of samples),
  157.     the number of sample bits (either 8 or 16), the submission chunk
  158.     (1 in DOS or Linux w/ mmaped sound, larger in Linux w/o mmaped sound),
  159.     playback speed in Hz (usually 11025 to 44100), the DMA buffer address
  160.     in hexadecimal (usually 8 digits after the 0x, starting with 0xf00..
  161.     in DOS, starting with 0x400.. in Linux, and less than 8 digits if the
  162.     hardware was not initialized successfully), and the number of channels
  163.     mixed in software (8 by default, changeable w/ NUMCHANNELS command).
  164.  
  165. Variables
  166. ---------
  167.  
  168. NOSOUND
  169.   Syntax: nosound [0 or 1]
  170.   Description: Setting NOSOUND to 1 will prevent further sound effects
  171.     from being loaded or started.  Returning it to 0 (default) will allow
  172.     sound effects to be started again.  However, if a level is started with
  173.     NOSOUND set to 1, and then it is returned to 0, no sounds will be
  174.     precached, and they will not be cached during play.
  175.   Demo Examples: nosound 1
  176.  
  177. DECIMATE_SFX
  178. DECIMATE_SFX_SPEED
  179. DECIMATE_SFX_WIDTH
  180.   Syntax: decimate_sfx [0 or 1]
  181.   Description: Setting DECIMATE_SFX to 1 will decimate all cached sound
  182.     effects to the lower of their recorded sound rate or the value of
  183.     DECIMATE_SFX_SPEED.  It will also reduce 16 bit sound effects to 8 bit
  184.     sound effects if DECIMATE_SFX_WIDTH is 1.  DECIMATE_SFX can save a
  185.     great deal of memory at the cost of making some of the sounds a bit
  186.     muffled or perhaps staticky.  After setting this, a level must be
  187.     reloaded for it to take effect.  SOUNDLIST will display the new memory
  188.     footprint and sound effect lengths.  The following example will probably
  189.     save 75% of the RAM required for a level's sound effects while keeping
  190.     the sound effects at roughly the same playback quality of Doom's sound
  191.     effects.  After setting these variables, a map must be reloaded for them
  192.     to take effect.  By default, DECIMATE_SFX is 0, and sfx are not decimated.
  193.   Demo Examples : decimate_sfx_speed 11025
  194.                   decimate_sfx_width 1
  195.                   decimate_sfx 1
  196.  
  197.  
  198. Sound Blaster Sound Card Command-Line Options and Commands
  199. ==========================================================
  200.  
  201. The following applies to Sound Blaster cards or compatibles under DOS
  202. or a DOS box.
  203.  
  204. Command-Line Options
  205. --------------------
  206.  
  207. SBVER
  208.   Syntax: -sbver <major version #> <minor version #>
  209.   Description: This will force the sound code to behave as though the
  210.     card's version is as specified instead of reading the actual version.
  211.     When running the SBINFO command, the major and minor version numbers
  212.     are separated by a decimal point.  In this command-line option, they
  213.     are separated by a space.
  214.  
  215. DMASIZE
  216.   Syntax: -dmasize <DMA buffer size in bytes>
  217.   Description: Instead of using a 16k DMA buffer, the sound code will
  218.     use one the size specified.  The size *must be* a power of 2.
  219.     Examples of valid sizes are 2048, 4096, 8192, 16384, 32768, and
  220.     65536.  Do not go higher than 65536.  You might want to make the
  221.     DMA buffer size larger if you hear jumbled or poppy sound and tend
  222.     to have a slow frame rate (under 15 fps).  Or you might want to make
  223.     it smaller if you have a fast machine and are having troubles under
  224.     Win95.
  225.  
  226. Commands
  227. --------
  228.  
  229. SBINFO
  230.   Syntax: sbinfo
  231.   Description: This will print information on the Sound Blaster card
  232.     in the system.  If the version is 4 or greater, then it is some
  233.     kind of Sound Blaster 16 or compatible.  If less, then it is
  234.     probably a Sound Blaster or Sound Blaster Pro or compatible.
  235.     If the version is 3, then it will be reported as 2.  This is
  236.     a hack that may be fixed later.  The port is the I/O port
  237.     sensed from the A variable in the BLASTER environment variable.
  238.     The DMA is the DMA channel and is confirmed in hardware if the
  239.     card is version 4 or higher.  The mixer port can be ignored.
  240.  
  241.  
  242. Linux Sound Driver Environment Variables
  243. ========================================
  244.  
  245. The Linux sound driver in the demo version runs in a seperate process
  246. and communicates via shared memory with the game.  The process is called
  247. "dmasim" and from the game process's point of view, simulates the behavior
  248. of a DMA buffer feeding a sound card.  Later, there may be a version of
  249. the game which can look directly at the actual DMA buffer and has no need
  250. for the seperate process.  Because you may not pass command-line options
  251. to the dmasim process, you may set variables using environment variables.
  252. If using bash, you set these by typing "export QUAKE_SOUND_SPEED=22050" on
  253. the command line before you run xquake.
  254.  
  255. QUAKE_SOUND_SPEED
  256.   Syntax: export QUAKE_SOUND_SPEED=<valid speed for your sound card>
  257.   Description: This will set the playback speed for the sound driver.
  258.     Higher speeds will allow some sound effects to sound better but
  259.     require more CPU horsepower.  Typical speeds are 11025, 22050, or
  260.     44100, however it's likely you can specify any value between 8000
  261.     and 44100.  The default speed is 44100 Hz.
  262.  
  263. QUAKE_SOUND_SAMPLEBITS
  264.   Syntax: export QUAKE_SOUND_SAMPLEBITS=<8 or 16>
  265.   Description: This will set the playback sample bits for the sound
  266.     driver.  8 sample bits will not mix sounds as accurately and may
  267.     sound cheesey, but it is supported on all cards.  16 sample bits
  268.     sounds better, and it does not cost any CPU performance, but your
  269.     sound card must support it.
  270.  
  271. QUAKE_SOUND_CHANNELS
  272.   Syntax: export QUAKE_SOUND_CHANNELS=<1 or 2>
  273.   Description: Not to be confused with the software mixing channels,
  274.     this simply refers to whether to output mono or stereo sound
  275.     effects.  Mono sound effects will be quieter with distance in
  276.     the game, and sounds pretty good, but stereo sound effects will
  277.     also come out of different speakers depending on whether the sound
  278.     effect in the game is to your left or right.  This can be important
  279.     to game play as your ears can help you locate nasties.
  280.  
  281. QUAKE_DEBUG_DMA
  282.   Syntax: export QUAKE_DEBUG_DMA=<filename or "|command">
  283.   Description: For the hacker only.  This will stream the sound output
  284.     to a file in a raw format with sample bits and speed as reported by
  285.     the SOUNDINFO command.  Be very careful with this.  A stereo playback
  286.     at 16bit, 44kHz (CD quality) is generating 176400 bytes/second of
  287.     data.  Leaving a game running for one minute will create a 10Mb file.
  288.     If the filename starts with the pipe character "|" then the rest of the
  289.     filename is interpreted as a command and is piped to it through the
  290.     popen() call and fwrite()'s & fflush()'s every submission chunk
  291.     sample sets, as reported by SOUNDINFO.
  292.  
  293. -------------------------------cut here----------------------------------
  294.  
  295.                   Quake Deathmatch TEST #1 Sound Bug Report
  296.  
  297.  
  298. E-mail (preferred) to: qtest1@idsoftware.com
  299. or FAX to: 214 686 9288
  300.  
  301. Date:
  302.  
  303. Name:
  304.  
  305. Company:
  306.  
  307. Street address:
  308.  
  309. City, state, ZIP:
  310.  
  311. Phone:
  312.  
  313. Fax:
  314.  
  315. E-mail:
  316.  
  317. What operating system are you running?:
  318.  
  319. Manufacturer/model of sound card:
  320.  
  321. Attach here the "qconsole.log" file generated when you run quake with the
  322. "-condebug" option and run the SOUNDINFO and SBINFO (DOS only) commands:
  323.  
  324. If DOS or a DOS box, please run the command "set > set.txt" then
  325. attach set.txt here:
  326.  
  327. If DOS, please attach your AUTOEXEC.BAT file here:
  328.  
  329. If DOS, please attach your CONFIG.SYS file here:
  330.  
  331. If Win95, pray.
  332.  
  333. Please describe the problem you are encountering, including a procedure
  334. for reproducing the problem:
  335.  
  336. If program crashed with nasty undecipherable techno-garbage, please
  337. look for the eight-digit number/letter thingy which comes after "eip="
  338. and write it down here:
  339.  
  340. Please list any error messages, crash dump, or other information
  341. that you think might be relevant:
  342.  
  343. Do you program or do technical support at school or work?
  344.  
  345. -------------------------------cut here----------------------------------
  346.  
  347.